package cn.tedu.exec2;

import java.util.Scanner;

/*本类用作士兵类的测试类*/
public class TestDemo {
    public static void main(String[] args) {
        Soldier b  = new Soldier();

        AK47 a = new AK47();
        System.out.println("按回车射击，输入load装载子弹");
        while(true){
            b.go();
            String s = new Scanner(System.in).nextLine();
            b.attack();
            if(s.equals("load")){
                a.load();
                continue;
            }
            a.fire();
        }
    }
}
